import {defineConfig,searchForWorkspaceRoot } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

export default defineConfig({
    plugins: [
        vue({
            template: {
                compilerOptions: {
                    isCustomElement: tag => /^micro-app/.test(tag)
                }
            }
        }),
    ],
    server: {
        port: 3000,
        host:'0.0.0.0',
        open: true,
        fs: {
            allow: [
                searchForWorkspaceRoot(process.cwd()),
                '/mygit/micro-zoe/micro-app/'
            ]
        }
    },
    base: '/main-vite/',
    build: {
        outDir: 'main-vite',
    },
    resolve: {
        alias: {
            '@': path.resolve(__dirname, './src')
        }
    },

})
